{
  "properties" : { },
  "id" : "ca8aa8751c1a4046ae049facfd495c79",
  "script" : null,
  "groupId" : "5affd458495e4bf8a43e1f578f0ce3a9",
  "name" : "实时告警页统计告警数量用",
  "createTime" : 1727070949077,
  "updateTime" : 1726223465209,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "alarmCount",
  "method" : "GET",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : null,
  "description" : "",
  "requestBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }
}
================================
sql = """
SELECT
            COUNT ( 1 ) total,
               SUM ( CASE WHEN IS_RECOVERY = 1 THEN 1 ELSE 0 END ) isSolve,
               SUM ( CASE WHEN IS_RECOVERY = 0 THEN 1 ELSE 0 END ) unSolve
        FROM
            ALARM_INFO
"""
return db.select(sql)